package dongze.com.ckdj.service.uploader;

import io.reactivex.ObservableEmitter;
import io.reactivex.Scheduler;

/**
 * Created by fanqwz on 2017/8/22.
 */

public class DummyUploader extends Uploader<Object, Object> {
    public DummyUploader(Scheduler subscribeThread, Scheduler observerThread) {
        super(subscribeThread, observerThread);
    }

    @Override
    Worker<Object, Object> getWorker() {
        return dummyWorker;
    }

    Worker<Object, Object> dummyWorker = new Worker<Object, Object>() {

        @Override
        public void accept(Object depends) {

        }

        @Override
        public void doWork(ObservableEmitter<Object> e) {
            e.onError(new Exception("dummy worker, nothing to do"));
        }
    };
}
